﻿using System;
using System.Collections.Generic;
using UnityEngine;

// Token: 0x02000572 RID: 1394
public class ExcelData : ScriptableObject
{
	// Token: 0x1700038F RID: 911
	public string this[int cell, int row]
	{
		get
		{
			return this.Get(cell, row);
		}
	}

	// Token: 0x17000390 RID: 912
	// (get) Token: 0x0600218F RID: 8591 RVA: 0x001301FC File Offset: 0x0012E3FC
	public int MaxCell
	{
		get
		{
			return this.list.Count;
		}
	}

	// Token: 0x06002190 RID: 8592 RVA: 0x0013020C File Offset: 0x0012E40C
	public virtual string Get(global::ExcelData.Specify specify)
	{
		return this.Get(specify.cell, specify.row);
	}

	// Token: 0x06002191 RID: 8593 RVA: 0x00130220 File Offset: 0x0012E420
	public virtual string Get(int cell, int row)
	{
		string result = string.Empty;
		if (cell < this.list.Count && row < this.list[cell].list.Count)
		{
			result = this.list[cell].list[row];
		}
		return result;
	}

	// Token: 0x06002192 RID: 8594 RVA: 0x0013027C File Offset: 0x0012E47C
	public virtual List<string> GetCell(int row)
	{
		List<string> list = new List<string>();
		foreach (global::ExcelData.Param param in this.list)
		{
			if (row < param.list.Count)
			{
				list.Add(param.list[row]);
			}
		}
		return list;
	}

	// Token: 0x06002193 RID: 8595 RVA: 0x001302FC File Offset: 0x0012E4FC
	public virtual List<string> GetCell(int rowStart, int rowEnd)
	{
		List<string> list = new List<string>();
		if ((ulong)rowStart > (ulong)((long)rowEnd))
		{
			return list;
		}
		foreach (global::ExcelData.Param param in this.list)
		{
			int num = rowStart;
			while (num < param.list.Count && num <= rowEnd)
			{
				list.Add(param.list[num]);
				num++;
			}
		}
		return list;
	}

	// Token: 0x06002194 RID: 8596 RVA: 0x00130398 File Offset: 0x0012E598
	public virtual List<string> GetRow(int cell)
	{
		List<string> list = new List<string>();
		if (cell < this.list.Count)
		{
			foreach (string item in this.list[cell].list)
			{
				list.Add(item);
			}
		}
		return list;
	}

	// Token: 0x06002195 RID: 8597 RVA: 0x00130418 File Offset: 0x0012E618
	public virtual List<string> GetRow(int cellStart, int cellEnd)
	{
		List<string> list = new List<string>();
		if ((ulong)cellStart > (ulong)((long)cellEnd))
		{
			return list;
		}
		int num = cellStart;
		while (num < this.list.Count && num <= cellEnd)
		{
			foreach (string item in this.list[num].list)
			{
				list.Add(item);
			}
			num++;
		}
		return list;
	}

	// Token: 0x06002196 RID: 8598 RVA: 0x001304B4 File Offset: 0x0012E6B4
	public virtual List<global::ExcelData.Param> Get(global::ExcelData.Specify start, global::ExcelData.Specify end)
	{
		List<global::ExcelData.Param> list = new List<global::ExcelData.Param>();
		if ((ulong)start.cell > (ulong)((long)end.cell) || (ulong)start.row > (ulong)((long)end.row))
		{
			return list;
		}
		if (start.cell < this.list.Count)
		{
			int num = start.cell;
			while (num < this.list.Count && num <= end.cell)
			{
				global::ExcelData.Param param = new global::ExcelData.Param();
				if (start.row < this.list[num].list.Count)
				{
					param.list = new List<string>();
					int num2 = start.row;
					while (num2 < this.list[num].list.Count && num2 <= end.row)
					{
						param.list.Add(this.list[num].list[num2]);
						num2++;
					}
				}
				list.Add(param);
				num++;
			}
		}
		return list;
	}

	// Token: 0x06002197 RID: 8599 RVA: 0x001305C8 File Offset: 0x0012E7C8
	public virtual List<global::ExcelData.Param> Get(global::ExcelData.Specify start, global::ExcelData.Specify end, string find)
	{
		List<global::ExcelData.Param> list = new List<global::ExcelData.Param>();
		list = this.Get(start, end);
		foreach (global::ExcelData.Param param in list)
		{
			foreach (string b in param.list)
			{
				if (find == b)
				{
					global::ExcelData.Param param2 = new global::ExcelData.Param();
					param2.list = new List<string>();
					foreach (string item in param.list)
					{
						param2.list.Add(item);
					}
					list.Add(param2);
					break;
				}
			}
		}
		return list;
	}

	// Token: 0x06002198 RID: 8600 RVA: 0x001306EC File Offset: 0x0012E8EC
	public virtual List<global::ExcelData.Param> Find(string find)
	{
		List<global::ExcelData.Param> list = new List<global::ExcelData.Param>();
		foreach (global::ExcelData.Param param in this.list)
		{
			foreach (string b in param.list)
			{
				if (find == b)
				{
					global::ExcelData.Param param2 = new global::ExcelData.Param();
					param2.list = new List<string>();
					foreach (string item in param.list)
					{
						param2.list.Add(item);
					}
					list.Add(param2);
					break;
				}
			}
		}
		return list;
	}

	// Token: 0x06002199 RID: 8601 RVA: 0x0013080C File Offset: 0x0012EA0C
	public virtual List<global::ExcelData.Param> FindArea(string find, global::ExcelData.Specify spe)
	{
		List<global::ExcelData.Param> list = new List<global::ExcelData.Param>();
		int num = 0;
		int num2 = 0;
		for (int i = 0; i < this.list.Count; i++)
		{
			for (int j = 0; j < this.list[i].list.Count; j++)
			{
				if (find == this.list[i].list[j])
				{
					num = i + 1;
					num2 = j;
					break;
				}
			}
		}
		int num3 = num;
		while (num3 < this.list.Count && num3 < num + spe.cell)
		{
			global::ExcelData.Param param = new global::ExcelData.Param();
			int num4 = num2;
			while (num4 < this.list[num3].list.Count && num4 < num2 + spe.row)
			{
				param.list = new List<string>();
				param.list.Add(this.list[num3].list[num4]);
				list.Add(param);
				num4++;
			}
			num3++;
		}
		return list;
	}

	// Token: 0x0600219A RID: 8602 RVA: 0x00130944 File Offset: 0x0012EB44
	public virtual List<global::ExcelData.Param> FindArea(string find)
	{
		List<global::ExcelData.Param> list = new List<global::ExcelData.Param>();
		int num = 0;
		int num2 = 0;
		for (int i = 0; i < this.list.Count; i++)
		{
			for (int j = 0; j < this.list[i].list.Count; j++)
			{
				if (find == this.list[i].list[j])
				{
					num = i + 1;
					num2 = j;
					break;
				}
			}
		}
		for (int k = num; k < this.list.Count; k++)
		{
			global::ExcelData.Param param = new global::ExcelData.Param();
			for (int l = num2; l < this.list[k].list.Count; l++)
			{
				param.list = new List<string>();
				param.list.Add(this.list[k].list[l]);
				list.Add(param);
			}
		}
		return list;
	}

	// Token: 0x040029B7 RID: 10679
	public List<global::ExcelData.Param> list = new List<global::ExcelData.Param>();

	// Token: 0x02000573 RID: 1395
	public class Specify
	{
		// Token: 0x0600219B RID: 8603 RVA: 0x00130A60 File Offset: 0x0012EC60
		public Specify(int cell, int row)
		{
			this.cell = cell;
			this.row = row;
		}

		// Token: 0x0600219C RID: 8604 RVA: 0x00130A78 File Offset: 0x0012EC78
		public Specify()
		{
		}

		// Token: 0x040029B8 RID: 10680
		public int cell;

		// Token: 0x040029B9 RID: 10681
		public int row;
	}

	// Token: 0x02000574 RID: 1396
	[Serializable]
	public class Param
	{
		// Token: 0x040029BA RID: 10682
		public List<string> list = new List<string>();
	}
}
